<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="commn/base.css" />
		<link rel="stylesheet" type="text/css" href="css/weui.min.css" />
		<link rel="stylesheet" type="text/css" href="css/jquery-weui.min.css" />
		<link rel="stylesheet" type="text/css" href="Hui-iconfont/1.0.8/iconfont.css" />
		<style type="text/css">
			body {
				display: -webkit-box;
				-webkit-box-orient: vertical;
				width: 100%;
				background-color: #EFEFF4;
			}
			
			.index {
				min-width: 240px;
			}
			
			.top {
				display: -webkit-box;
				width: 100%;
				height: 40px;
				background-color: #0F88EB;
			}
			
			.top>p {
				line-height: 40px;
				text-indent: 1em;
				color: white;
				font-size: 18px;
				font-weight: bold;
				-webkit-box-flex: 1;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}
			
			.back {
				color: white;
				font-size: 18px;
				margin-left: 15px;
				line-height: 40px;
			}
			
			.title {
				margin: 10px;
				height: 40px;
				outline: none;
				border-bottom: 1px solid #EEEEEE;
			}
			
			.content {
				margin: 10px;
				height: 300px;
				outline: none;
				border-bottom: 1px solid #EEEEEE;
			}
			
			.data {
				display: -webkit-box;
				height: 70px;
				margin: 3px;
				border: 1px solid #EEEEEE;
				background-color: white;
			}
			
			.detail_photo {
				width: 50px;
				height: 50px;
				margin: 10px;
				border-radius: 40px;
				border: 1px solid #EEEEEE;
				overflow: hidden;
			}
			
			.detail_photo img {
				width: 50px;
				height: 50px;
			}
			
			.detail_name {
				-webkit-box-flex: 1;
			}
			
			.detail_name>p {
				height: 30px;
				line-height: 35px;
			}
			
			.detail_name>p:nth-child(1) {
				font-weight: bold;
				line-height: 40px;
			}
			
			.detail_name>p:nth-child(2) {
				font-size: 14px;
				color: #999999;
			}
			
			.add {
				width: 70px;
				margin: 20px 10px;
				text-align: center;
				font-weight: bold;
				color: #0F88EB;
				height: 30px;
				line-height: 30px;
				border-radius: 8px;
				border: 2px solid #0F88EB;
			}
			
			.detail_article {
				margin: 3px;
				border: 1px solid #EEEEEE;
				min-height: 400px;
				background-color: white;
				margin-bottom: 65px;
			}
			
			.detail_article p:nth-child(1) {
				font-size: 18px;
				line-height: 30px;
				font-weight: bold;
			}
			
			.bottom {
				display: -webkit-box;
				width: 100%;
				height: 60px;
				position: fixed;
				bottom: 0px;
				background-color: white;
			}
			
			.bottom>span {
				display: block;
			}
			
			.bottom>div:nth-of-type(1) {
				width: 60px;
				height: 30px;
				position: relative;
				top: 10px;
				left: 20px;
				color: #0F88EB;
				border: 1px solid #0F88EB;
				font-size: 20px;
				line-height: 30px;
				padding: 5px 20px;
				border-radius: 10px;
			}
			
			.bottom>div:nth-of-type(3) {
				color: #9B9B9B;
				width: 50px;
				height: 60px;
				font-size: 20px;
				line-height: 50px;
				text-align: center;
			}
			.bottom>span:nth-of-type(1)>div {
				color: #9B9B9B;
				width: 50px;
				height: 60px;
				font-size: 20px;
				line-height: 50px;
				text-align: center;
			}
			
			.null {
				-webkit-box-flex: 1;
			}
			
			.good {
				text-align: center;
				-webkit-user-select: none;
			}
		</style>
	</head>

	<body>
		<div class="index">
			<div class="top" v-for="lee in message">
				<a href="home.html" class="back Hui-iconfont Hui-iconfont-slider-left"></a>
				<p v-html="lee.title"></p>
			</div>
			<div class="data" v-for="lee in message">
				<div class="detail_photo">
					<img src="common/img/1.jpg" />
				</div>
				<div class="detail_name">
					<p v-html="lee.id">昵称</p>
					<p>简介</p>
				</div>
				<div class="add">
					+ 关注
				</div>
			</div>
			<div class="detail_article" v-for="lee in message">
				<p v-html="lee.title"></p>
				<p v-html="lee.context"></p>
			</div>
			<div class="bottom">
				<div class="good Hui-iconfont Hui-iconfont-zan2" style="cursor: pointer;" v-html="lee.n_zan"></div>
				<div class="null"></div>
				<div v-for="lee in message">
					<p class="Hui-iconfont Hui-iconfont-cang2"></p>
				</div>

				<span  v-for="lee in message" @click="link(lee.id)">
					<div>
						<p class="Hui-iconfont Hui-iconfont-leijipingjia"></p>
					</div>
				</span>
			</div>
		</div>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var newVue = new Vue({
				el: "body",
				data: {
					message: []
				},
				methods:{
					link:function(e){
						location.href="comment.html?id="+e
					}
				}
			})
			var ss;
			var dd;
			var index;
			var reg = new RegExp("(^|&)" + "id" + "=([^&]*)(&|$)", "i");
			var r = window.location.search.substr(1).match(reg);
			if(r != null) {
				console.log(unescape(r[2]));
				index = unescape(r[2]);
			} else {
				console.log(null);
			};
			$.ajax({
				type: 'get',
				//async:false,
				url: "http://v2.mashupcloud.cn/developer/auth.do",
				data: {
					appkey: 'FvWrIYOQoTUYVbscUNQoQAVqsLnZqKEN',
					appsecret: 'ugCfcSmyLkcbCGfIuFOPEgTgPQPbyJSE'

				},
				success: function(json) {
					//		            console.log(json);
					ss = JSON.parse(json)[1];
					dd = JSON.parse(json)[2];
					console.log('获得token成功');
					$.ajax({
						type: 'get',
						url: "http://v2.mashupcloud.cn/SQL/sele_tie_id/",
						data: {
							appid: dd,
							token: ss,
							name: 'sele_tie_id',
							_v1: index
						},
						success: function(json) {
							console.log(JSON.parse(json));
							newVue.message = JSON.parse(json)[2];
						},
						error: function(json) {
							console.log("err:" + json);
						}
					});
				},
				error: function(json) {
					console.log("err:" + json);
				}
			});
			var a = $(".good").html();
			$(".good").click(function() {
				a++;
				$(".good").html(a);
			});
		</script>
	</body>

</html>